unit uUIText;

interface
uses
  Windows, Messages, SysUtils, Variants, Forms, ComCtrls, Controls, Classes,
  StdCtrls, Buttons, ExtCtrls, IdURI, IdCoderMIME,
  jpeg, IniFiles;

function GetUI(AForm:TForm;AName:string;Key:string=''):string;

implementation

function GetUI(AForm:TForm;AName:string;Key:string=''):string;
var
  myini:TIniFile;
  sFormName:string;
begin
  try
    myini:=TIniFile.Create(ExtractFilePath(Application.ExeName)+'UI.Dat');
    if AForm=nil then
    begin
      sFormName:='';
    end
    else
    begin
      sFormName:=AForm.Name;
    end;
    if myini.ValueExists(sFormName,AName+'_'+Key) then
    begin
      Result:=myini.ReadString(sFormName,AName+'_'+Key,'');
    end
    else
    begin
      myini.WriteString(sFormName,AName+'_'+Key,'');
    end;
  finally
    myini.Free;
  end;


end;


end.
